package com.oracle.mapper;

import com.oracle.pojo.Orders;
import com.oracle.pojo.OrdersExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface OrdersMapper {
    long countByExample(OrdersExample example);

    int deleteByExample(OrdersExample example);

    int deleteByPrimaryKey(Integer oid);

    int insert(Orders record);

    int insertSelective(Orders record);

    List<Orders> selectByExample(OrdersExample example);

    Orders selectByPrimaryKey(Integer oid);

    int updateByExampleSelective(@Param("record") Orders record, @Param("example") OrdersExample example);

    int updateByExample(@Param("record") Orders record, @Param("example") OrdersExample example);

    int updateByPrimaryKeySelective(Orders record);

    int updateByPrimaryKey(Orders record);

    List<Orders> selectOrdresAllByExample(OrdersExample example);

    @Select("select last_insert_id()")
    int selectLastInsertId();

    @Select("select paycode from orders where oid=#{oid}")
    int selectPayCodeByOid(Integer oid);

    @Update("update orders set paycode=1 where oid=#{oid}")
    Integer updateOrdersPayCodeByOid(int oid);
}